package date0603_1;

import java.time.Duration;
import java.time.LocalDate;
import java.time.LocalDateTime;

public class PersonTest {

	public static void main(String[] args) {
		
		LocalDate firstDate = LocalDate.of( 1999 , 10 , 20 );
		Person first = new Person( "杨过" , '男' , firstDate , false );
		System.out.println( first );
		
		LocalDate secondDate = LocalDate.of( 2014 , 5 , 8 );
		Person second = new Person( "郭襄" , '女' , secondDate , false );
		System.out.println( second );
		
		second.marry( first );
		
		System.out.println( "~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~" );
		
		LocalDateTime now = LocalDateTime.now() ;
		LocalDateTime dt = LocalDateTime.of( 1999, 1, 1, 15, 0);
		
		Duration d = Duration.between( dt ,  now );
		
		System.out.println( d.toDays() );

	}

}
